import request from '@/utils/request'

// 获取每周销售数据
export function getWeeklySales(query) {
    console.log('getWeeklySales query参数:', query);
    return request({
        url: '/system/product/week/list',
        method: 'get',
        params: query
    })
}

// 获取月度销售数据
export function getMonthlySales(query) {
    console.log('getMonthlySales query参数:', query);
    return request({
        url: '/system/product/month/list',
        method: 'get',
        params: query
    })
}

// 获取部门订购排行榜（参数修正为typeId，与后端保持一致）
export function getDepartmentRanking(query) {
    console.log('getDepartmentRanking query参数:', query);
    return request({
        url: '/system/product/department/ranking',
        method: 'get',
        params: query
    })
}
